<template>
  <div class="DeliveryDetails">
    <el-card class="box-card">
      <div slot="header" class="clearfix">
        <span style="line-height: 36px;">发货明细报表</span>
      </div>
      <s-table
        :table="table"
        @http="tableWatch">
        <el-form-item slot="multiSelect" label="多选操作" prop="multiSelect" v-if="table.multiSelect">
          <el-row>
            <el-col :span="8">
              <el-button size="small" type="info" @click="tableExport('')">多选导出</el-button>
            </el-col>
          </el-row>
        </el-form-item>
      </s-table>
    </el-card>
  </div>
</template>

<script>
  import {AutoVue} from '~/plugins/Tools';
  export default AutoVue({
    name: 'journaling_stockCountDaily-FEcarWms',
    head: {
      'title': '发货明细报表',
      'meta': [
        {'hid': 'description', 'name': 'description', 'content': '乐速科技平台 发货明细报表 查看发货明细报表信息'},
      ],
    },
    data: {
      table: {
        column: [
          { label: '订单号',
            prop: 'ordernumber',
            minWidth: '0px',
            search: false,
          },
          { label: '发货日期',
            prop: 'thedateofissuance',
            minWidth: '0px',
            search: false,
          },
          { label: '支付日期',
            prop: 'dateofpayment',
            minWidth: '0px',
            search: false,
          },
          { label: '一级',
            prop: 'classA',
            minWidth: '0px',
            search: false,
          },
          { label: '二级',
            prop: 'classB',
            minWidth: '0px',
            search: false,
          },
          { label: '三级',
            prop: 'classC',
            minWidth: '0px',
            search: false,
          },
          { label: '用途',
            prop: 'purpose',
            minWidth: '0px',
            search: false,
          },
          { label: '发起人',
            prop: 'initiator',
            minWidth: '0px',
            search: false,
          },
          { label: '发起部门',
            prop: 'initiatingDepartment',
            minWidth: '0px',
            search: false,
          },
          { label: '订单状态',
            prop: 'orderstatus',
            minWidth: '0px',
            search: false,
          },
          { label: '收货人姓名',
            prop: 'consigneeName',
            minWidth: '0px',
            search: false,
          },
          { label: '国家',
            prop: 'country',
            minWidth: '0px',
            search: false,
          },
          { label: '省份',
            prop: 'sheng',
            minWidth: '0px',
            search: false,
          },
          { label: '城市',
            prop: 'city',
            minWidth: '0px',
            search: false,
          },
          { label: '县',
            prop: 'county',
            minWidth: '0px',
            search: false,
          },
          { label: '收货地址',
            prop: 'receivingaddress',
            minWidth: '0px',
            search: false,
          },
          { label: '收获方式',
            prop: 'wayofreceiving',
            minWidth: '0px',
            search: false,
          },
          { label: '电话',
            prop: 'telephone',
            minWidth: '0px',
            search: false,
          },
          { label: '产品编号',
            prop: 'productnumber',
            minWidth: '0px',
            search: false,
          },
          { label: '产品名称',
            prop: 'productname',
            minWidth: '0px',
            search: false,
          },
          { label: '数量',
            prop: 'quantity',
            minWidth: '0px',
            search: false,
          },
          { label: '总金额',
            prop: 'totalamount',
            minWidth: '0px',
            search: false,
          },
          { label: '订单备注',
            prop: 'ordernotes',
            minWidth: '0px',
            search: false,
          },
        ],
        url: '/wmsprovincerankingreport/Shippingdetails',
        key: 'id',
        tableColumn: 23,
      },
    },
    transition: 'slide-fade',
    methods: {
      tableExport (row) {
        this.$confirm('各销售渠道订单状态汇总。', '确认导出？', {
          confirmButtonText: '是',
          cancelButtonText: '否',
          type: 'warning',
        })
          .then(async _ => {
            try {
              await this.p({
                url: '/ExportController/ShippingdetailsExcel',
                method: 'post',
                responseType: 'blob',
              });
            } catch (err) {
              console.log(err);
            }
          })
          .catch(_ => {
          });
      },
    },
    mounted: function () {
      this.tableWatch('table');
    },
  });
</script>
<style scoped lang="scss">
</style>

<style lang="scss">
  .DeliveryDetails{
    width: 88vw;
    float: left;
  }
</style>
